class Solution:
    def replaceDigits(self, s: str) -> str:
        lst = list(s)
        size = len(lst)

        for i in range(1, size, 2):
            c, x = lst[i - 1], int(lst[i])
            lst[i] = chr(((ord(c) - 97) + x) % 26 + 97)

        return "".join(lst)


if __name__ == "__main__":
    print(Solution().replaceDigits("a1c1e1"))  # abcdef
    print(Solution().replaceDigits("a1b2c3d4e"))  # abbdcfdhe
